package Test;

import Practice_Enum.Month;

import java.util.Scanner;

/**
 * @author caesar
 * @date 2025/7/11
 * @Description:
 * @apiNote
 */
public class TestMonth {
    public static void main(String[] args)
    {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入年份值：");
        int year = input.nextInt();

        System.out.print("请输入月份值：");
        int monthValue = input.nextInt();
        Month month = Month.of(monthValue);
        System.out.println(month +"的月份值：" + month.getValue() +"，名称：" + month.name()+"，描述：" + month.getDescription());

        System.out.println("月份总天数：" + month.length(year%4==0 && year%100!=0 || year%400==0));

        input.close();
    }
}
